<?php

class Test extends CI_Controller{
    function __construct()
 {
   parent::__construct();
   
    //$ip = '122.176.78.38';
   
 }
 function index(){
     $location = file_get_contents('http://freegeoip.net/json/122.176.78.38');
     print_r($location);
     echo $location;
     print_r(json_decode($location));
     //print_r (explode("",$location));
 }
 }